//
//  TPWalletInfoViewController.m
//  TradingPlatform
//
//  Created by 李坤 on 2019/5/20.
//  Copyright © 2019 程强. All rights reserved.
//

#import "TPWalletInfoViewController.h"
#import <WebKit/WebKit.h>

@interface TPWalletInfoViewController ()
@property (strong, nonatomic) WKWebView *walletWeb;
@end

@implementation TPWalletInfoViewController
- (void)gotoBack
{
    if (self.comeFrom == kWalletInfoControllerFromCommitOrder) {
        [self dismissViewControllerAnimated:YES completion:nil];
    }else{
        [super gotoBack];
    }
}
- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupUI];
}
- (void)setupUI
{
//    self.navigationController.navigationBar.translucent = NO;
//    self.edgesForExtendedLayout = UIRectEdgeNone;
    _walletWeb = [[WKWebView alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, ScreenHeight-(NAVBAR_HEIGHT+STATUSBAR_HEIGHT))];
    [self.view addSubview:_walletWeb];
    
//    _walletUrl = @"https://www.baidu.com";
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:self.walletUrl]];
    [_walletWeb loadRequest:request];
}
@end
